#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	char arr1[100] = { 0 };
	char arr2[100] = { 0 };
	gets(arr1);
	gets(arr2);
	int len1 = strlen(arr1);
	int i = 0;
	for (i = 0; i < len1; i++)
	{
		if (strchr(arr2, arr1[i]) == NULL)
		{
			printf("%c", arr1[i]);
		}
	}
	return 0;
}